import ToolHttp from "@/tool/http/ToolHttp.js";

export async function getUrl() {
    let res = await ToolHttp.get("http://121.40.237.31:38000/cros-forward?url=http://60.205.204.130:8080/manage/app/getCameraPreviewURL?cameraIndexCode=c0a17c31ace6437199040256e8b973a4");
    res = JSON.parse(res)
    return res.data.url
}

export function getHlsUrl(cameraIndexCode) {
	return ToolHttp.get(`/frame/hai-kang/get-stream-url?cameraIndexCode=${cameraIndexCode}&streamUrlProtocol=PROTOCOL_HLS&channelBusinessId=40289f5a7e3c994d017e3c998daf0000`);
}